<?php

/**
 * subcategory actions.
 *
 * @package    sf_sandbox
 * @subpackage subcategory
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class subcategoryActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->forward('default', 'module');
  }
  
  /**
  * Executes view action
  *
  * @param sfRequest $request A request object
  */
  public function executeView(sfWebRequest $request)
  {
    $category = CategoryTable::getInstance()->findBySlug($request->getParameter('category'));
    $this->category = $category[0];
  	$subcategory = SubcategoryTable::getInstance()->findBySlug($request->getParameter('subcategory'));
    $this->subcategory = $subcategory[0];
  }
}
